# -*- coding: utf-8 -*-
# @Author : Yuan
from rest_framework import serializers
from apps.goods.models import SPUSpecification


class SPUSpecificationModelSerializer(serializers.ModelSerializer):
    spu_id = serializers.IntegerField()
    spu = serializers.StringRelatedField(read_only=True)

    class Meta:
        model = SPUSpecification
        fields = ['id', 'name', 'spu', 'spu_id']







